package main

import "fmt"

func main() {
	myarr := []int{1, 2, 3, 1, 1, 2, 2, 2, 2, 2, 3}
	l := len(myarr)
	var r [11] int
	for i := 0; i < l; i++ {
		r[myarr[i]] ++
	}

	for i := 0; i < 11; i++ {
		for r[i] > 0 {
			fmt.Print(i," ")
			r[i]--
		}
	}
	fmt.Println()

	var arr [3][]int
	for i := 0; i < len(myarr); i++ {
		arr[myarr[i]-1] = append(arr[myarr[i]-1], myarr[i])
	}
	fmt.Println(arr)
}
